<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSlidesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //幻灯片
        Schema::create('slides', function (Blueprint $table) {
            $table->id();
            $table->string('title',200)->comment('标题');
            $table->string('pic',100)->default('')->comment('图片');
            $table->string('link',200)->default('')->comment('跳转链接');
            $table->unsignedInteger('sorting')->default(0)->comment("排序");
            $table->tinyInteger("isopen")->nullable()->default(1)->comment("是否开启[否,是]");
            $table->tinyInteger("mobile")->nullable()->default(1)->comment("是否移动端[否,是]");
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('slides');
    }
}
